home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Magazine Collection 2001
/
Delphi Magazine Collection 20001 (2001).iso
/
DISKS
/
Issue61
/
BHO
/
uSimpleBHO.pas
< prev
Wrap
Pascal/Delphi Source File
|
2000-06-17
|
1KB
|
49 lines
unit uSimpleBHO;
interface
uses
Windows, ActiveX, Classes, ComObj, pSimpleBHO_TLB, StdVcl, Dialogs;
type
TMyBHO = class(TTypedComObject, IMyBHO, IObjectWithSite )
protected
{Declare IMyBHO methods here}
public
function SetSite(const pUnkSite: IUnknown ):HResult; stdcall;
function GetSite(const riid: TIID; out site: IUnknown):HResult; stdcall;
{ function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer;
Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; stdcall;
}
end;
implementation
uses ComServ;
function TMyBHO.SetSite(const pUnkSite: IUnknown ):HResult;
begin
ShowMessage( 'Inside SetSite.' );
Result := S_OK;
end;
function TMyBHO.GetSite(const riid: TIID; out site: IUnknown):HResult;
begin
Result := S_OK;
end;
{function TMyBHO.Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer;
Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult;
begin
Result := S_OK;
end;
}
initialization
TTypedComObjectFactory.Create(ComServer, TMyBHO, Class_MyBHO,
ciMultiInstance, tmApartment);
end.